<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 100px;
        height: 100px;
        background-color: #f00;
      }
    </style>
  </head>
  <body>
    <!-- 
        :style="{属性名:属性值,属性名2:属性值2,属性名3:属性值3}"     主流用法
        :style="[{属性名:属性值,属性名2:属性值2},{属性名3:属性值3}]"    了解 
     -->
    <div id="app">
      <button @click="num+=10">点击一下加盒子宽度10</button>
      <div class="box" :style="{width:num+'px'}"></div>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: '#app',
        data: {
          num: 100
        }
      })
    </script>
  </body>
</html>
